boardSum = int(input('Board\'s sum: '))
lines = int(input('How many lines? '))

lineSum = boardSum / lines  # 计算每行/列对角线的和
bit = lineSum / lines  # 计算每格的平均值
center = lineSum * 2 - bit * 5  # 行列交叉，中心算两次，再减平铺的格子
# 尽量简便

if center == int(center):
	center = int(center)

print('中心格是' + str(center))  # 输出
